GitLab construction and maintenance (based on Docker image sameersbn/docker-gitlab)1. Read the basics of this Article
Familiar with git
Familiar with docker
2. GitLab introduction 2.1. Overview
Use Docker to deploy Gitlab and docker to deploy gitlab
The company's code server has been built using Gitosis, but it is too troublesome to manage users and permissions,Now we want to build Gitlab on the original server and install it directly using the official
process was too cumbersome and did not work for a day, so the GitLab program was stranded.Of course, some third parties also provide a one-click Gitlab installation solution (such as Bitnami GitLab Installers), but they are not very cold and have not tried it.Docker makes GitLab installation and deployment easier
Nowa
Using Docker to build Gitlab practicesBoth SVN and git need to beThe current versioning system (version control System,vcs) has a centralized version-versioning system (centralized version control system, referred to as CVCS) and a distributed versioning system (distributed Version Control System, referred to as DVCS).The representative of the centralized version control system is SVN, the representative of
Because the company's code server has been built using gitosis, but due to user and rights management too cumbersome,Now want to build Gitlab on the original server, use the Gitlab official method to install directly,can cause conflicts with gitosis, making gitosis unusable,Because we want to keep two services at the same time, we think of using Docker to build G
Today, the company requirements in the Docker installation Gitlab+mysql, after a day of tossing, finally finished.System: CentOS 6.5 (64-bit)1. First install and start DockerThis step is no longer introduced, you see my previous CentOS 6.5 installed Docker and Jenkins article bar.
2. Installation PreparationMkdir/srv/docker
First, the preparatory workSecond, the Environment configurationThird, submit the update and automatically deploy to the server, test address: http://182.61.57.121:8000
First, the preparatory work
Gitlab Environment (for convenience, use of the official custodian warehouse)
Installed docker and gitlab-runne
, Available, Manage Jenkins, find Blue Ocean, GitLab Plugin and restart Jenkins after installation
Docker Run Gitlab
$sudoDocker Run--Detach--publish10443:443--publish8098: the--publish10022: A --name Gitlab--Restart always--network docker-Net--Envgitlab_om
container, and then publish them to any popular Linux machine or virtualize them. Containers are completely sandbox-aware, with no interface (like IPhone apps) between them. There is little performance overhead and can be easily run in the machine and data center. Most importantly, they are not dependent on any language, framework including system.Installing Docker:# wget-qo-https://get.docker.com/| ShInstall Doc
Deploying GitLab 8.2.2 in Docker
The company wants to build an online code hosting platform based on GitLab, an open-source project, to facilitate management, testing, staging, and server deployment. If it is set up separately on CentOS7, it is quite simple to follow the tutorials on the official website. As for the configuration, it is indeed complicated, and a
Docker Build Gitlab-ce
No Internet environment, external Docker pull [image],docker save [Image] > [Image].tar, under LAN Docker load First, create an empty container volume to facilitate data backup migration:
sudo docker pull U
First, download the Docker imagePrerequisite: The Docker engine is already installed.
Docker Pull Gitlab/gitlab-ce
Second, start the application
Docker run-d- H gitlab.zhaojigang.com -p 80:80-v/etc/
-watch-only-exposed-wait5s:30s/etc/docker-gen/templates/nginx.tmpl/etc/nginx/conf.d/default.confEcho "starting Letsencrypt-nginx-proxy-companion ..."Docker Run-D-E"Nginx_docker_gen_container=nginx-gen" --volumes-From Nginx-V $ (pwd)/.. /.. /volumes/proxy/certs:/etc/nginx/CERTS:RW-v/var/run/docker.sock:/var/run/Docker.sock:ro JRCs/letsencrypt-nginx-proxy-companion# This a example service that'll get pick
1 The client's Ssh-key is configured on Gitlab or the password needs to be entered gitlab默认是以http方式进行上传的,但是文件过大,nginx与gitlab的默认配置限制了客户端像服务器传送文件的大小 当前 环境当中gitlab是以docker来跑的一个容器,端口映射发现失败,所以直接修改2 Problem Solving1 log on to the server, modify the configuration file
Since the official only supports Docker to connect to GitHub's auto build, what should we do with other version control (such as GITLAB,CVS, etc.)?Bloggers Use the Docker plugin provided by Jenkins+jenkins.Need to use Dood (Docker-outside-of-docker) or Dind (
Every time a team builds an application, it is troublesome and error-prone to export the war package through eclipse/sts, then upload it to the server, copy it to Tomcat, and manually stop/start the Tomcat service.
I used Gitlab, MAVEN, Docker tools, plus a shell script, to make a simple automated build tool.
1. First install JDK version 64, MAVEN, modify/etc/profile file as follows:
java_home=/home/git/jdk
The current program is Gitlab + Jenkins + Docker + Kubernetes.The workflow for the scenario is as follows: First, the developer submits the code code, and then the GITLAB automatically triggers the Jenkins job,jenkins job to build the corresponding image, placed in a kubernetes pod; The Kubernetes pod will include other dependencies that the module needs in its i
Sameersbn-gitlab is better more than officalsSAMEERSBN/Redminehttps://hub.docker.com/r/sameersbn/redmine/Integrated configurationOnce the installation of the above tools is complete, you will need to install a nginx on the host and then configure the domain name to forward the Docker app with the domain name.Assuming your domain name is example.com, you can assign a subdomain to each app.
Gitlab.ex
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.